<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>条件渲染</title>
    <script src="./vue.js"></script>
</head>
<body>
<div id="app">
    <div v-if="show">{{message}}</div>
    <div v-show="show">{{message}}</div>

    <div v-if="word === 'a'">This is a</div>
    <div v-else-if="word === 'b'">This is b</div>
    <div v-else>This is others</div>
</div>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            show: false,
            word: 'a',
            message: "v-if"
        }
    });
</script>
</body>
</html>